package com.freeLearning.boot.system.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.freeLearning.boot.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@TableName("sys_carousel")
@EqualsAndHashCode(callSuper = false)
public class Carousel  {
    @Schema(description = "轮播图标题")
    private String title;

    @Schema(description = "轮播图描述")
    private String description;

    @Schema(description = "轮播图按钮文字")
    private String buttonText;

    @Schema(description = "轮播图链接")
    private String link;

    @Schema(description = "轮播图背景图片")
    private String backgroundImage;

    @Schema(description = "轮播图排序")
    private Integer sortOrder;

    @Schema(description = "是否启用")
    private Integer isActive;

    @Schema(description = "是否显示按钮")
    private Integer isShowButton;

    @Schema(description = "是否显示标题")
    private Integer isShowTitle;

    @Schema(description = "是否显示描述")
    private Integer isShowDescription;

    @Schema(description = "背景颜色")
    private String backgroundColor;

    @Schema(description = "标题字体颜色")
    private String titleColor;

    @Schema(description = "描述字体颜色")
    private String desColor;

    @Schema(description = "是否开启点击背景跳转")
    private Integer isClickBackgroundLink;

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String updateTime;
}
